$(document).ready(function() {
	$(".datepickerinput").datepicker({
		showOn: "button",
		buttonImage: url_img_datepicker.innerHTML,
		buttonImageOnly: true,
	});
	$.datepicker.setDefaults( $.datepicker.regional[ "fr" ] );

	var tab = new Array();

	$.ajax({
		type : "POST",
		url : "recupererDemandesAutoComplete.action",
		success : function(response) {
			$.map( response.allCPDemande, function(val, id) {
				tab.push(val);
			});
		},
	});

	$( "#nomdemandeauto" ).autocomplete({
		minLength: 0,
		source: tab,
		height: "200px"
	});

	$("#tableau").tablesorter({
		dateFormat: "uk",
		headers: {
			3 : { sorter: "shortDate"},
			6: { 
				sorter: false 
			}, 
			7: { 
				sorter: false 
			}, 
			8: { 
				sorter: false 
			}, 
			9: { 
				sorter: false 
			} 
		}
	});


});


